﻿using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;

namespace SHKF.B2C.Model.Dto
{
    public class ErrorDto
    {
        public string TraceId { get; set; }

        public Error error { get; set; }

        public void SetError(HttpResponseMessage httpResponseMessage)
        {
            this.error = new Error() { code = -1, msg = httpResponseMessage.ToString() };
        }

        public void SetException(Exception ex)
        {
            this.error = new Error()
            {
                code = -1,
                msg = ex.Message.ToString()
            };
        }
    }
}
